
		//我要报名弹出层功能开始
		function showEnrollLayer(){
			var obj = {
		 		title:"我要报名：" + document.getElementById("hidden_jobName").value,
		 		innerDivId:'innerLayerDiv',
		 		zIndex:2500,
		 		top:10
		 	};
		 	createPageLayer(obj);
			
			//修改弹出层中的字体
		 	if(document.getElementById("pageLayer"))
		 	{
		 		document.getElementById("pageLayer").style.fontFamily="'宋体', Arial";
		 	}
			//弹出我要报名层的时候就将该工作的补充说明写进去
		 	//document.getElementById("description_check").value = jobDescription;    
			
		 	//使用ajax获取用户信息的工作信息，自动填充表单
		 	$.ajax({
				async : false,
				cache : false,
				type : 'POST',
				dataType : "html",
				data : "waJob.id=" + document.getElementById("hidden_jobId").value,
				url : "/cn/enroll/getUserJobInfo.action",
				error : function() {//请求失败处理函数
					alert("提交失败！");
				},
				success : function(data) { //请求成功后处理函数。
					var result = eval("(" + data + ")");
					document.getElementById("user_id_check").value = result.userId;
					document.getElementById("resume_id_check").value = result.resumeId;
					//document.getElementById("job_id_check").value = result.jobId;
					//document.getElementById("job_name_check").value = result.jobName;
					document.getElementById("full_name_check").value = result.fullName;
					document.getElementById("mobile_check").value = result.mobile;
					document.getElementById("mobile_bak_check").value = result.mobileBak;
					document.getElementById("phone_check").value = result.phone;
					document.getElementById("email_check").value = result.email;
					document.getElementById("qq_num_check").value = result.qqNum;
					document.getElementById("hidden2").value = result.country;
					document.getElementById("pop2").value = result.countryName;
					document.getElementById("hidden1").value = result.industry;
					document.getElementById("pop1").value = result.industryName;
				}
			});
		}
		//提交前的验证函数
		function checkForm(){
			var checkFlag = true;
			var focusFlag = true;
			
			if(!checkNotNullAndSize(document.getElementById('full_name_check'),'full_name',50,'该项目必须填写','该项目长度应在50字以内','')){
				checkFlag = false;
				if(focusFlag == true){//姓名
					document.getElementById('full_name_check').focus();
					document.getElementById('full_name_check').select();
					focusFlag = false;
				}
			}
			
			if(!checkNotNullAndIsMobile(document.getElementById('mobile_check'),'mobile','手机号格式不正确','该项目必须填写','请输入常用手机号')){
				checkFlag = false;
				if(focusFlag == true){//手机号 不为空
					document.getElementById('mobile_check').focus();
					document.getElementById('mobile_check').select();
					focusFlag = false;
				}
			}
			
			if(!checkIsMobile(document.getElementById('mobile_bak_check'),'mobile_bak','手机号格式不正确','请输入紧急联系人手机号')){
				checkFlag = false;
				if(focusFlag == true){//手机号 不为空
					document.getElementById('mobile_bak_check').focus();
					document.getElementById('mobile_bak_check').select();
					focusFlag = false;
				}
			}
			
			if(!checkSize(document.getElementById('phone_check'),'phone',50,'该项目长度应在50字以内','如+86-24-12345678')){
				checkFlag = false;
				if(focusFlag == true){//固定电话
					document.getElementById('phone_check').focus();
					document.getElementById('phone_check').select();
					focusFlag = false;
				}
			}
			
			if(!checkIsEmail(document.getElementById('email_check'),'email','电子邮件格式不正确','请输入正确的电子邮件')){
				checkFlag = false;
				if(focusFlag == true){//电子邮件
					document.getElementById('email_check').focus();
					document.getElementById('email_check').select();
					focusFlag = false;
				}
			}

			if(!checkSize(document.getElementById('qq_num_check'),'qq_num',50,'该项目长度应在50字以内','请输入正确的QQ号')){
				checkFlag = false;
				if(focusFlag == true){//qq号
					document.getElementById('qq_num_check').focus();
					document.getElementById('qq_num_check').select();
					focusFlag = false;
				}
			}
			
			if(!checkNotNull(document.getElementById('hidden2'),'country','该项目必须填写','')){
				checkFlag = false;
				if(focusFlag == true){
					document.getElementById('pop2').focus();
					focusFlag = false;
				}
			}
			
			if(!checkNotNull(document.getElementById('hidden1'),'industry','该项目必须填写','')){
				checkFlag = false;
				if(focusFlag == true){
					document.getElementById('pop1').focus();
					focusFlag = false;
				}
			}
			
			if(!checkSize(document.getElementById('description_check'),'description_t',500,'该项目长度应在500字以内','长度在500字以内')){
				checkFlag = false;
				if(focusFlag == true){
					document.getElementById('description_check').focus();
					document.getElementById('description_check').select();
					focusFlag = false;
				}
			}
			return checkFlag;
		}


		function createObj2(){
			var obj = {
				actionUrl:"/cn/enroll/getCountryJson.action",    //ajax要去调用的action
				inputLabel:"pop2",         //input标签的id
				hiddenLabel:"hidden2",     //hidden标签的id
				alertNum:"5",             //最多可以选几项   
				hintTitle:"最想去的国家",        //弹出层标题
				selectedTitle:"已选国家",     //已选项的标题
				confirmFunction:function(){
					checkNotNull(document.getElementById("hidden2"),'country','该项目必须填写','');
					if(document.getElementById("pop2").value ==""){
						document.getElementById("pop2").value="选择/修改";
					}
				}
			};
			popupChannel(obj);     //这是要去调用pop.js文件中的popChannel()方法
		}
		function createObj1(){
			var obj = {
				actionUrl:"/cn/enroll/getIndustryJson.action",    //ajax要去调用的action
				inputLabel:"pop1",         //input标签的id
				hiddenLabel:"hidden1",     //hidden标签的id
				alertNum:"3",             //最多可以选几项   
				hintTitle:"想从事的行业",        //弹出层标题
				selectedTitle:"已选行业",     //已选项的标题
				confirmFunction:function(){
					checkNotNull(document.getElementById("hidden1"),'industry','该项目必须填写','');
					if(document.getElementById("pop1").value ==""){
						document.getElementById("pop1").value="选择/修改";
					}
				}
			};
			popupChannel(obj);     //这是要去调用pop.js文件中的popChannel()方法
		}
		
		
		//提交报名表单
		function submitForm(){
			if(!checkForm()){	   //表单验证
				return ;
			}
			function submitFormDo(){
				var wageCheckCombo = document.getElementById("wage_check");
			 	$.ajax({
					async : true,
					cache : false,
					type : 'POST',
					dataType : "html",
					data : {"waEnroll.userId":document.getElementById("user_id_check").value,
						"waEnroll.resumeId":document.getElementById("resume_id_check").value,
						"waEnroll.jobId":document.getElementById("hidden_jobId").value,
						"waEnroll.jobName":document.getElementById("hidden_jobName").value,
						"waEnroll.fullName":document.getElementById("full_name_check").value,
						"waEnroll.mobile":document.getElementById("mobile_check").value,
						"waEnroll.mobileBak":document.getElementById("mobile_bak_check").value,
						"waEnroll.phone":document.getElementById("phone_check").value,
						"waEnroll.email":document.getElementById("email_check").value,
						"waEnroll.qqNum":document.getElementById("qq_num_check").value,
						"waEnroll.country":document.getElementById("hidden2").value,
						"waEnroll.industry":document.getElementById("hidden1").value,
						"waEnroll.wage":wageCheckCombo.options[wageCheckCombo.selectedIndex].value,
						"waEnroll.description":document.getElementById("description_check").value}
						,
					url : "/cn/enroll/saveFrontForJob.action",
					error : function() {
						alert("提交失败！");
					},
					success : function(data) { 
						if(data.substring(0,9) != "{success:"){
							alert("提交失败！");
							return ;
						}
						var result = eval("(" + data + ")");
						if(result.success){
							closePageLayer();
							if(result.registerTag == "0"){
								alert("报名成功!\n" + 
									"系统已为您自动注册用户\n" + 
									"用户名：" + result.userName + "\n" + 
									"密码：您的手机号后六位\n" + 
									"您可以直接用你的手机号和密码登录");
							}else if(result.registerTag == "1"){
								var obj={
									title:'提示',
									text:'报名成功'
								};
								createTipLayer(obj);
							}
						}else{
							alert(result.msg);
							if(result.errorType){
								if(result.errorType == "mobile" && document.getElementById("mobile_check")){
									document.getElementById("mobile_check").focus();
								}
							}
						}
					}
				});
			 }
			submitFormDo();
		}
		//记录点击的QQ
		function addQqaccess(qqNum){
		 	//使用ajax提交到后台
		 	$.ajax({
				async : false,
				cache : false,
				type : 'POST',
				dataType : "html",
				data : {"waQqaccess.qqNum":qqNum},
				url : "/cn/qqaccess/addQqaccess.action",
				error : function() {//请求失败处理函数
					alert("提交失败！");
				},
				success : function(data) { //请求成功后处理函数。
				}
			});
		}
	